Why can't my jsp page read chinese chars from mysql? [migrated]
Posted
by
Canking
on Programmers
See other posts from Programmers
or by Canking
Published on 2012-06-09T08:23:08Z
Indexed on
2012/06/09
10:47 UTC
Read the original article
Hit count: 208
The mysql chars is utf-8, and the jsp page is also set to utf-8. I use the method:
DriverManager.getConnection("jdbc:mysql://localhost:3306/jsptest?"+"useUnicode=true&characterEncoding=UTF-8","root","");
But it can not be use. When I insert Chinese chars into mysql and select it out, that would be proper functioning. The question is when I select some Chinese chars that I write into mysql at first, it would be all the "?" at the Chinese char place! Please watch the picture:
© Programmers or respective owner